%Personal
\newcommand{\loris}[1]{\textcolor[rgb]{1.00,0.00,0.00}{#1}}

%Environment
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}

\newenvironment{proof}[1][Proof]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

\newcommand{\Fig}[1]{Fig. #1}
\newcommand{\Def}[1]{Def. #1}
\newcommand{\Tab}[1]{Tab. #1}
\newcommand{\Lemma}[1]{Lemma #1}
\def\Proof{{\bf Proof.}}
\def\qed{{\bf $\Box$}}

%Definitions
\newcommand{\Nat}{\ensuremath{\mathbb{N}}}
\newcommand{\NW}{\ensuremath{NW}}
\newcommand{\NWA}{\ensuremath{NWA}}
\newcommand{\NWL}{\ensuremath{NWL}}
\newcommand{\VPA}{\ensuremath{VPA}}
\newcommand{\VPL}{\ensuremath{VPL}}
\newcommand{\NWLs}{\ensuremath{NWLs}}
\newcommand{\NWAs}{\ensuremath{NWAs}}
\newcommand{\STT}{\ensuremath{STT}}
\newcommand{\STTs}{\ensuremath{STTs}}
\newcommand{\STTr}{\ensuremath{STT^R}}
\newcommand{\MSO}{\ensuremath{MSO}}
\newcommand{\st}{\ensuremath{^*}}
\newcommand{\eqdef}{\ensuremath{\doteq}}
\newcommand{\sep}{\ensuremath{~\mathbf{|}~ }}
\newcommand{\Sigmahat}{\ensuremath{\hat{\Sigma}}}
\newcommand{\lang}{\ensuremath{\langle}}
\newcommand{\rang}{\ensuremath{\rangle}}
\newcommand{\ffromto}[3]{\ensuremath{#1:#2\mapsto #3}}
\newcommand{\fst}{\ensuremath{\textsf{fst}}}
\newcommand{\snd}{\ensuremath{\textsf{snd}}}
\newcommand{\Context}{\ensuremath{\mathcal{C}}}
\newcommand{\Tree}[2]{\ensuremath{\mathcal{T}(#1,#2)}}
\newcommand{\card}[1]{\ensuremath{|#1|}}
\newcommand{\pow}[1]{\ensuremath{2^{#1}}}
\newcommand{\lists}[1]{\ensuremath{{#1}\st}}
\newcommand{\undef}{\ensuremath{\bot}}
\newcommand{\matchrel}{\ensuremath{\rightsquigarrow}}
\newcommand{\FV}{\ensuremath{FV}}
\newcommand{\SV}{\ensuremath{SV}}


%Streaming Tree Transducer

%Trees and Nested Words
\newcommand{\OT}{\ensuremath{OT}}
\newcommand{\OTalph}{\ensuremath{\OT(\iinputalph)}}
\newcommand{\hedges}{\ensuremath{H}}
\newcommand{\hedgalph}{\ensuremath{\hedges(\iinputalph)}}
\newcommand{\HWalph}{\ensuremath{HW(\iinputalph)}}
\newcommand{\TWalph}{\ensuremath{TW(\iinputalph)}}
\newcommand{\nwalph}{\ensuremath{NW(\iinputalph)}}
\newcommand{\tw}{\ensuremath{t\_w}}
\newcommand{\tnw}{\ensuremath{t\_nw}}
\newcommand{\nwt}{\ensuremath{nw\_t}}

%Examples
\newcommand{\transduction}{\ensuremath{f}}


%SST
\newcommand{\sst}{\ensuremath{T}}
\newcommand{\sstinputalph}{\ensuremath{\Sigma}}
\newcommand{\sstoutputalph}{\ensuremath{\Gamma}}
\newcommand{\sststates}{\ensuremath{Q}}
\newcommand{\sststate}{\ensuremath{q}}
\newcommand{\sstinitstate}{\ensuremath{\state_0}}
\newcommand{\sstvars}{\ensuremath{X}}
\newcommand{\sstvar}{\ensuremath{x}}
\newcommand{\sstout}{\ensuremath{F}}
\newcommand{\sststtr}{\ensuremath{\delta}}
\newcommand{\sstvarup}{\ensuremath{\rho}}


%STT
\newcommand{\stt}{\ensuremath{W}}
\newcommand{\sttinputalph}{\ensuremath{\hat{\Sigma}}}
\newcommand{\sttiinputalph}{\ensuremath{\Sigma}}
\newcommand{\sttcinputalph}{\ensuremath{\lang\Sigma}}
\newcommand{\sttrinputalph}{\ensuremath{\Sigma\rang}}
\newcommand{\sttoutputalph}{\ensuremath{\Gamma}}
\newcommand{\sttstates}{\ensuremath{Q}}
\newcommand{\sttstate}{\ensuremath{q}}
\newcommand{\sttpstates}{\ensuremath{P}}
\newcommand{\sttpstate}{\ensuremath{p}}
\newcommand{\sttinitstate}{\ensuremath{\state_0}}
\newcommand{\sttinitpstate}{\ensuremath{\pstate_0}}
\newcommand{\sttvars}{\ensuremath{X}}
\newcommand{\sttvar}{\ensuremath{x}}
\newcommand{\sttpvars}{\ensuremath{X^p}}
\newcommand{\sttpvar}{\ensuremath{x^p}}
\newcommand{\sttout}{\ensuremath{F}}

\newcommand{\sttsttr}{\ensuremath{\delta}}
\newcommand{\sttintsttr}{\ensuremath{\delta_i}}
\newcommand{\sttcalsttr}{\ensuremath{\delta_c}}
\newcommand{\sttretsttr}{\ensuremath{\delta_r}}

\newcommand{\sttvarup}{\ensuremath{\rho}}
\newcommand{\sttintvarup}{\ensuremath{\varup_i}}
\newcommand{\sttintvaruppar}[3]{\ensuremath{\varup_i(#1,#2,#3)}}
\newcommand{\sttcalvarup}{\ensuremath{\varup_c}}
\newcommand{\sttretvarup}{\ensuremath{\varup_r}}

\newcommand{\MNWred}[5]{\ensuremath{#1 \xrightarrow{\hspace*{0.3cm}#2,#3\hspace*{0.6cm}#4\hspace*{0.3cm}} #5}}


%Set and notation
\newcommand{\tree}{\ensuremath{t}}
\newcommand{\treeset}{\ensuremath{T}}
\newcommand{\bigo}{{O}}
\newcommand{\brac}[1]{\ensuremath{\llbracket #1\rrbracket}}


\newcommand{\DFAlist}{\ensuremath{\~{D}}}
\newcommand{\DFA}{\ensuremath{D}}
\newcommand{\varlist}{\ensuremath{\~{\sttvars}}}


%Variables and symbols
\newcommand{\emptystring}{\ensuremath{\varepsilon}}

